package com.hnit.rol.statistics.schedule;

import com.hnit.rol.commonutils.DateUtil;
import com.hnit.rol.statistics.service.StatisticsDailyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * 定时任务类
 */
@Component
public class ScheduleTask {
//    @Autowired
//    private StatisticsDailyService dailyService;
//
//    // cron表达式,每天每隔两小时执行
//    @Scheduled(cron = "0 0 0/2 * * ?")
//    public void task() {
//        String day = DateUtil.formatDate(new Date());
//        dailyService.registerMemberCount(day);
//    }
}